package org.akomantoso.core.io.util.group;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

import org.akomantoso.core.data.TLCConcept;
import org.akomantoso.core.data.TLCEvent;
import org.akomantoso.core.data.TLCLocation;
import org.akomantoso.core.data.TLCObject;
import org.akomantoso.core.data.TLCOrganization;
import org.akomantoso.core.data.TLCPerson;
import org.akomantoso.core.data.TLCProcess;
import org.akomantoso.core.data.TLCReference;
import org.akomantoso.core.data.TLCRole;
import org.akomantoso.core.data.TLCTerm;
import org.akomantoso.core.data.group.TLC;
import org.akomantoso.core.io.util.Instantiator;

/**
 * 
 * @author <a href="mailto:jacques.militello@gmail.com">Jacques Militello</a>
 * 
 */
public final class TLCGroup {

	private TLCGroup() {
	}

	public static final Map<String, Instantiator<TLC>> MAP;

	static {

		final Map<String, Instantiator<TLC>> temp = new HashMap<String, Instantiator<TLC>>();

		// TLCPerson
		temp.put(TLCPerson.ELEMENT, new Instantiator<TLC>() {
			public TLCPerson instantiate() {
				return new TLCPerson();
			}
		});

		// TLCOrganization;
		temp.put(TLCOrganization.ELEMENT, new Instantiator<TLC>() {
			public TLCOrganization instantiate() {
				return new TLCOrganization();
			}
		});

		// TLCReference;
		temp.put(TLCReference.ELEMENT, new Instantiator<TLC>() {
			public TLCReference instantiate() {
				return new TLCReference();
			}
		});

		// TLCTerm;
		temp.put(TLCTerm.ELEMENT, new Instantiator<TLC>() {
			public TLCTerm instantiate() {
				return new TLCTerm();
			}
		});

		// TLCRole;
		temp.put(TLCRole.ELEMENT, new Instantiator<TLC>() {
			public TLCRole instantiate() {
				return new TLCRole();
			}
		});

		// TLCTerm;
		temp.put(TLCTerm.ELEMENT, new Instantiator<TLC>() {
			public TLCTerm instantiate() {
				return new TLCTerm();
			}
		});

		// TLCConcept;
		temp.put(TLCConcept.ELEMENT, new Instantiator<TLC>() {
			public TLCConcept instantiate() {
				return new TLCConcept();
			}
		});

		// TLCLocation;
		temp.put(TLCLocation.ELEMENT, new Instantiator<TLC>() {
			public TLCLocation instantiate() {
				return new TLCLocation();
			}
		});

		// TLCObject;
		temp.put(TLCObject.ELEMENT, new Instantiator<TLC>() {
			public TLCObject instantiate() {
				return new TLCObject();
			}
		});

		// TLCEvent;
		temp.put(TLCEvent.ELEMENT, new Instantiator<TLC>() {
			public TLCEvent instantiate() {
				return new TLCEvent();
			}
		});
		
		// TLCProcess;
		temp.put(TLCProcess.ELEMENT, new Instantiator<TLC>() {
			public TLCProcess instantiate() {
				return new TLCProcess();
			}
		});

		MAP = Collections.unmodifiableMap(temp);
	}

}